package com.finance.rule.service;

import com.finance.rule.bean.pojo.MasterRule;
import com.finance.rule.bean.pojo.NewPieceRule;
import com.finance.rule.bean.pojo.NewRuleList;
import com.finance.rule.bean.pojo.NewWeightRule;
import com.finance.system.bean.pojo.Carrier;
import com.finance.system.bean.pojo.Region;
import com.finance.system.bean.pojo.Supplier;
import com.finance.system.bean.pojo.User;
import com.finance.util.pager.Pagination;

import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2017/8/5.
 */
public interface INewRuleService {



    List<NewRuleList> getRulesListPage(String province, String city, String supplierCode, String carrierCode, Pagination pagination);

    Pagination getRulePage(String province, String city, String supplierCode, String carrierCode, Pagination pagination);

    List<Region> getFatherRegionList();

    List<Supplier> getSupplierList();

    List<Carrier> getCarrierList();

    long saveNewWeightRule(List<Map<String,Object>> ruleList, User user);

    void saveNewWeightRule(MasterRule masterRule, List<NewWeightRule> newWeightRuleList,User user);

    long saveNewPieceRule(List<Map<String,Object>> ruleList,User user);

    void saveNewPieceRule(MasterRule masterRule, List<NewPieceRule> newPieceRuleList,User user);

    MasterRule getMasterRule(String ruleId);

    List<NewPieceRule> getNewPieceRules(String ruleId);

    List<NewWeightRule> getNewWeightRules(String ruleId);

    void updatePieceRule(MasterRule masterRule, List<NewPieceRule> newPieceRuleList, User user);

    void updateWeightRule(MasterRule masterRule, List<NewWeightRule> newWeightRuleList, User user);

    boolean deletePieceRules(String masterRuleId);

    boolean deleteWeightRules(String masterRuleId );


    List<Region> getCityRegionList(String code);
}
